import http from 'http';

// #region HttpRequest

export type RequestHeaders = http.IncomingHttpHeaders;

export type RequestBody = string | boolean | number | object | Buffer | null | undefined

/**
 * @see [RFC-2616](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)
 * or [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods)
 */
export type Method =
  | 'GET'
  | 'POST'
  | 'PUT'
  | 'DELETE'
  | 'HEAD'
  | 'PATCH'
  | 'CONNECT'
  | 'OPTIONS'
  | 'TRACE';

// #endregion

// #region HttpResponse

export type HeaderValue = string | string[] | number;

export type Headers = NodeJS.Dict<HeaderValue> | null | undefined;

// #endregion
